FIG. 18 shows a configuration of NC apparatus as a related art example, where components in the NC apparatus are interconnected via a network. In the figure, a numeral 50 represents a numerical controller (hereinafter referred to as an NC section), 51 numerical control means (hereinafter referred to as NC means) for controlling the entire NC apparatus, 52 PMC control means for controlling a machine tool, 53 a first network controller for controlling a network 60, 54a, 54b shaft controllers, 55a, 55b shaft control means for controlling a servo driving system, 56a, 56b second network controllers for controlling the network 60, 57 a screen controller, 58 screen control means for controlling I/O apparatus such as a CRT/MDI, and 59 a third network controller for controlling the network 60. The NC apparatus is composed of an NC section 50, shaft controllers 54a, 54b, and a screen controller 57. These components are interconnected via the network 60.
FIG. 19 shows a connection between NC apparatus, driving amplifiers and remote I/O units as a related art example. In the figure, a numeral 61 represents NC apparatus, 62 (62a, 62b) servo amplifiers for driving a servo motor (not shown), 63 (63a, 63b) spindle amplifiers for driving a spindle motor (not shown), 64 (64a, 64b) remote I/O units as external I/Os of the NC apparatus 61, and 65 (65a, 65b) line terminals. A numeral 66 (66a–66f) represents ID setup switches mounted on the servo amplifiers 62, spindle amplifiers 63 and remote I/O units 64 connected to the NC apparatus 61 in order to assign a station address and a communication time. A numeral 67 (67a, 67b) represents a communication hardware setup switches mounted on the remote I/O units.
A numeral 70 represents a data transmission cable for communications from the NC apparatus 61 to the servo amplifiers 62 and the spindle amplifiers 63 (hereinafter referred to as driving amplifiers), 71 a data transmission cable for communications from the driving amplifiers to the NC apparatus 61, 72 a data transmission cable for an emergency stop signal, and 73 a data transmission cable for a servo alarm. A servo communication line 74 is composed of four pairs of the aforementioned data transmission cables 70 through 73. A remote I/O communication line 76 is composed of a data transmission cable 75 for communications between the NC apparatus and the remote I/O units.
The NC apparatus 61 is connected to the driving amplifiers (servo amplifiers 62, spindle amplifiers 63) and the servo communication lines 74 and the connection is terminated by the line terminal 65a. The NC apparatus is connected to the remote I/O units 64 and the remote I/O communication line 76 and the connection is terminated by the line terminal 65b. 
FIG. 20 shows a serial connection between NC apparatus and driving amplifiers as a related art example. In the figure, a numeral 61 represents NC apparatus, 62 (62a, 62b) servo amplifiers 63 (63a, 63b) spindle amplifiers, 77 a transmission controller, and 78 a receiving controller. As shown in the figure, the NC apparatus 61, the servo amplifiers 62 (62a, 62b) and the spindle amplifiers 63 (63a, 63b) each has a transmission controller 77 and a receiving controller 78 used as a pair.
FIG. 21 shows communications in the NC system (one communication cycle) as a related art example. FIG. 21(a) shows communications between NC apparatus and driving amplifiers (one communication cycle). FIG. 21(b) shows communications between NC apparatus and remote I/O units (one communication cycle).
In FIG. 21(a), a numeral 80 (80a, 80b) represents communication frames transmitted from NC apparatus to driving amplifiers, and 81 (81a–81g) communication frames transmitted from a driving amplifier to NC apparatus. Communications between NC apparatus and driving amplifiers use a bidirectional full-duplex communication system via a pair of data transmission cables 70 and a pair of data transmission cables 71, as shown in FIG. 19.
In the communications from NC apparatus to driving amplifiers using the data transmission cable 70, the NC apparatus 61 as a master station transmits an arbitrary number of communication frames 80 to destination driving amplifiers in an arbitrary time during a communication cycle. A driving amplifier as a slave station constantly supervises the communication frames 80 transmitted from the NC apparatus 61 via the receiving controller 78 shown in FIG. 20 and receives the communication frames destined for the driving amplifier.
In the communications from a driving amplifier to NC apparatus using the data transmission cable 71, any one of a plurality of driving amplifiers may serve as a master station. Thus, the communication cycle undergoes time-division via a plurality of driving amplifiers and shared by the driving amplifiers and a driving amplifier as a master station transmits communication frames 81 (81a–81g) in a split communication time assigned. The NC apparatus 61 as a slave station receives the communication frames 81 transmitted from the other master stations on a per split communication time basis.
In FIG. 21(b), a numeral 82 (82a–82e) represents communication frames transmitted from the NC apparatus 61 to the remote I/O units 64, and 83 (83a–83e) communication frames transmitted from the remote I/O units 64 to the NC apparatus 61. As shown in FIG. 19, communications between NC apparatus and remote I/O units use a half-duplex communications system where the data transmission cable 75 for communications between NC apparatus and remote I/O units is shared by the NC apparatus 61 as a master station and a plurality of remote I/O units 64 and data is transmitted based on time division of a communication cycle.
One of the NC apparatus 61 and a plurality of remote I/O units 64 acts as a mater station and transmits communication frames 82 or communication frame 83. Devices other than the master station supervise the transmitted communication frames 82 as slave stations and receive communication frames 82 destined therefor.
In the aforementioned FIG. 21(a) and FIG. 21(b), in communications from a driving amplifier or remote I/O unit to NC apparatus, any one of a plurality of driving amplifiers and remote I/O units may serve as a master station. Thus, in order to perform time-division-based communications from a remote I/O unit to NC apparatus, communication time must be assigned so that the remote I/O units will not use time-division-based communication time in a overlapped fashion. Assignment of a station addresses and communication times is made by specifying ID numbers by using the ID setup switches 66.
FIG. 22 shows a configuration of a communication frame as a related art example. In case a plurality of slave stations exist, slave stations each is given its own station address. The master station specifies a specific slave station to perform communications with the slave station alone. In the figure, a numeral 84 represents a start flag, 85 a station address, 86 data, 87 a CRC (cyclic redundancy check), and 88 an end flag. The slave station supervises the station address 85 in the transmitted communication frame. The slave station receives the communication frame in case the station address has matched the pre-allocated station address or the station address specifies all the slave stations.
As mentioned earlier, in a related art NC system, communications between NC apparatus and driving amplifiers use a communications method including a communication cycle different from that communications between NC apparatus and remote I/O units, as shown in FIGS. 21(a) and 21(b). Thus the driving amplifiers and remote I/O units are connected to the NC apparatus via separate transmission lines as shown in FIG. 19. This leads to a problem of increased number of cables and more complicated wiring.
FIG. 23 shows communications (one communication cycle) as a related art example. By executing time-division of a communication cycle using a plurality of peripheral devices composed of driving amplifiers and remote I/O units, communications are performed while driving amplifiers and remote I/O units having different communication cycles are connected to the same transmission line. This configuration uses a single communication line, unlike a plurality of separate communication lines used as communication cables for driving amplifiers and communication cables for remote I/O units.
FIG. 23 shows the use state of the communication time of communication frames used in communications from NC apparatus to peripheral devices (servo amplifiers, spindle amplifiers, remote I/O units) and communications from peripheral devices to NC apparatus. In the figure, a numeral 89 (89a–89f) represents communication frames from NC apparatus to peripheral devices, 90 (90a–90f) communication frames from peripheral devices to NC apparatus. In communications from numerical control to peripherals devices, numerical control may serve as a master station. As shown in the figure, communication frames 89 are output by NC apparatus as a master station at an arbitrary time within the communication cycles.
In communications from peripherals devices to numerical control, any one of a plurality of peripheral devices may serve as a master station. Thus, the communication cycle undergoes time division and split communication times are assigned to peripheral devices without overlapping. A peripheral device acts as a master station only in the assigned time and communicates to NC apparatus as a slave station. As shown in the figure, communication frames 90 destined for NC apparatus are output from the peripheral device as a master station in the time assigned to the master station.
As mentioned earlier, it is possible to perform communications by connecting peripheral devices having different communication cycles to the same transmission line. In case time division is made in the peripheral device acting as a master station, it is necessary to perform communications in the shortest communication cycle. Thus the communication time is also assigned to devices that do not require a short communication cycle thereby worsening the communication efficiency.
In a related art NC system, as sow in FIG. 19, communications between NC apparatus and driving amplifiers use two pairs of data transmission cables for reporting an emergency stop signal that is not used in ordinary communications, on top of two pairs of data transmission cables for data communications. This leads to higher costs with respect to features and use frequency. These cables also complicates the wiring.
An approach is envisaged that two pairs of data transmission cables for reporting an emergency stop signal are omitted by providing a communication frame dedicated to an emergency stop signal and communicating an emergency stop signal in a communication cycle by using two pairs of data transmission cables for data communications. However, in case an emergency stop signal is transmitted in a dedicated communication frame, it is necessary to assign a time to accommodate a communication frame dedicated to an emergency stop signal in a communication cycle, thus requiring sufficient time. Further, in order to assure real-time conveyance of emergency stop information, it is necessary to insert a plurality of communication frames dedicated to an emergency stop signal in a communication cycle. When sufficient time is not available to follow such a procedure, quick conveyance of emergency stop information is disabled.
In case a communication frame dedicated to an emergency stop signal is not provided but emergency stop information is appended in a communication frame for transmission used in ordinary communications, it is necessary to check for emergency stop information on a per communication frame basis in order to detect emergency stop information in real time. This leads to a longer wait time in CPU processing caused by data retrieval from all the communication frames transmitted, thereby degrading the CPU performance.
An approach is envisaged that optical transmission module supporting high-speed data transmission are used in order to assure real-time conveyance of emergency stop information.
However, in case data transmission is performed via serial connection using optical transmission modules as a plurality of driving amplifiers composed of servo amplifiers and spindle amplifiers, high-speed data transmission is effected via a lightwave signal in a fiber-optic cable but transmission delay is generated in a driving amplifier, because it is necessary to convert a received lightwave signal to an electric signal, extract a data component and a clock component from the electric signal, store the components in a buffer, then transmit the components in synchronization with a transmit clock. This transmission delay accumulates as often as the number of connected driving amplifiers so that a time lag occurs in a synchronization signal receiving time depending on the location of connection (in which ordinal rank from the NC apparatus the target driving amplifier is connected) even when a synchronization signal is transmitted from NC apparatus to a driving amplifier on a per communication cycle basis. This causes dislocation of the synchronization timing between driving amplifiers even if the driving amplifier performs synchronization at the moment it has received a synchronization signal.
FIG. 24 shows the operation of a communication control buffer in communications using optical transmission modules as a related art example. In the figure, a numeral 91 represents a communication control buffer composed of a 32-bit FIFO (first-in, first-out), 92 a write pointer, and 93 a read pointer.
The write pointer 92 writes 1-bit receive data in synchronization with the clock component of the receive data and shifts the pointer by one bit. The read pointer 93 reads 1-bit data from the communication control buffer in synchronization with the clock component of the transmit data and shifts the pointer by one bit. Moving speed of the write pointer 92 does not match the moving speed of the read pointer 93. In case the transmit clock component is faster than the receive clock component, the read pointer 93 passes the write pointer 92 thus causing the bit pattern of a flag to be generated inadvertently. In order to prevent the bit pattern of a flag from being generated inadvertently while processing effective data, the number of data pieces in one-round transmit frame is limited so as to prevent the pointer passing phenomenon and the write pointer 92 is placed 16 bits apart from the read pointer 93 each time the flag of a frame is received.
In the aforementioned optical transmission module supporting high-speed transmission, restriction on the structure of bits in data is provided, such as “The number of successive 1s or 0s in transmission data shall be seven or below,” and “The incidence of 1 and 0 in transmission data is 50 percent,” in order to normally extract the data component and the clock component of receive data. In general a flag is appended at each of the head and tail of a transmit frame. When a bit structure such as “01111110” is selected for a bit pattern as a flag and the bit pattern is transmitted more than once, the incidence of “1” is excessively higher than that of “0” thus considerably degrading the communication performance in the optical transmission module thus preventing successful extraction of data component and clock component.
The method to set ID numbers using switches and to specify station addresses and communication times (transmit timing) for time-division-based communications leads to higher costs due to increased number of parts including switches, cumbersome setting work, increased set time, and human setting errors.
Communications in a related art NC system has a transmission controller and a receiving controller used as a pair. In this configuration, data communications between driving amplifiers are disabled, for example, data transmitted by the servo amplifier 62a to the NC apparatus 61 cannot be received by the servo amplifier 62b or the spindle amplifier 63b. Thus, data must be communicated by way of NC apparatus and high-speed inter-shaft correction is disabled.
The invention has been proposed to solve the foregoing problems. The first object of the invention is to provide a numerical control system that allows efficient communications wherein numerical control apparatus and peripheral devices composed of at least one of a servo amplifier, a spindle amplifier and a remote I/O unit are serially connected by using a communication cable composed of a data transmission cable for transmission and a data transmission cable for reception in order to perform time-division-based communications between the numerical control apparatus and the peripheral devices.
The second object of the invention is to provide a numerical control system that can transmit information related to emergency stop such as an alarm, gating off, and emergency stop in real time without using two pairs of twisted-pair cables dedicated to reporting of an emergency stop signal.
The third object of the invention is to provide a numerical control system that can set station addresses and communication times (transmit timing) for time-division-based communications without setting ID numbers via switch operation.
Another object of the invention is to provide a numerical control system that can perform synchronous control of a plurality of peripheral devices.
Another object of the invention is to provide a numerical control system that can communicate between peripheral devices.
Another object of the invention is to provide a numerical control system that can transmit information related to emergency stop such as an alarm, gating off, and emergency stop to devices connected upstream (hereinafter referred to as upstream nodes) as well as devices connected downstream (hereinafter referred to as downstream nodes).
Another object of the invention is to provide a numerical control system wherein, during data transmission using optical transmission modules, even in case the write pointer is out of synchronization with the read pointer in the communication control buffer or in case the communication control buffer is reset, a bit pattern obtained after the read pointer has moved is not a specific bit pattern serving as a flag.
Another object of the invention is to provide a numerical control system that maintains communication performance by bring the number of 1s and the number of 0s in balance for a start flag that is frequently used.